package com.hskn.hss.module.carPlan.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hskn.hss.core.domain.BaseEntity;
import com.hskn.hss.entity.TreeEntity;
import com.hskn.hss.exception.ExcelReaderDataException;
import com.hskn.hss.exception.HssException;
import com.hskn.hss.module.bigscreen.entity.vo.JxqsKaoQin;
import com.hskn.hss.module.carPlan.entity.CarPlan;
import com.hskn.hss.module.carPlan.to.CarPlanTo;
import com.hskn.hss.module.carPlan.to.CarWorkPlanCountTo;
import com.hskn.hss.module.carPlan.vo.*;
import com.hskn.hss.utils.page.PageVo;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List;


/**
 * <p>
 * 服务类
 * </p>
 *
 * @author hskn
 * @since 2021-05-17
 */
public interface CarPlanService extends IService<CarPlan> {

    PageVo mechanicalList(CarPlanTo carPlanTo);

    PageVo trashPickupList(CarPlanTo carPlanTo);

    PageVo garbageTransitList(CarPlanTo carPlanTo);

    CarPlanMessageVo create(CarPlanTo carPlanTo) throws ParseException;

    CarPlanMessageVo update(CarPlanTo carPlanTo) throws ParseException;

    CarPlanMessageVo updateIsEnable(CarPlanTo carPlanTo) throws ParseException;

    CarPlanVo read(CarPlanTo carPlanTo);

    CarPlanMessageVo delete(CarPlanTo carPlanTo) throws ParseException;

    List<CarPlan> repeatPlanName(CarPlanTo carPlanTo);

    WorkGroupByCarPlanVo deleteWorkGroup(CarPlanTo carPlanTo);

    WorkGroupByCarPlanVo deleteWorkRule(CarPlanTo carPlanTo);

    List<CarPlan> excelExport(CarPlanTo carPlanTo);

    void carPlanExcelImport(List<CarPlan> carPlanList, Integer type) throws ExcelReaderDataException;

    //机械作业报表
    List<JxqsWorkPlanCountVo> mechanicalWorkPlanCount(BaseEntity entity, CarWorkPlanCountTo carWorkPlanCountTo) throws HssException;

    //机械作业报表 - 详情
    List<JxqWorkPlanDetailVo>  mechanicalWorkPlanDetail(CarWorkPlanCountTo carWorkPlanCountTo) throws ParseException;

    //机械作业报表 - 车辆详情
    PageVo mechanicalWorkPlanDetailByCarVo(CarWorkPlanCountTo carWorkPlanCountTo);

    //垃圾清运报表
    List<LjqyWorkPlanCountVo> trashPickupWorkPlanCount(CarWorkPlanCountTo carWorkPlanCountTo);

    //垃圾清运报表 - 详情
    List<LjqyWorkPlanDetailVo> trashPickupWorkPlanDetail(CarWorkPlanCountTo carWorkPlanCountTo) throws ParseException;

    //垃圾清运报表 - 车辆详情
    PageVo trashPickupWorkPlanDetailByCar(CarWorkPlanCountTo carWorkPlanCountTo);


    //垃圾转运报表
    PageVo garbageTransitWorkPlanCount(BaseEntity entity, CarWorkPlanCountTo carWorkPlanCountTo);

    //垃圾转运报表  - 详情
    PageVo garbageTransitWorkPlanDetail(CarWorkPlanCountTo carWorkPlanCountTo);


    void updateCarTrackNowProgress(CarWorkPlanCountTo carWorkPlanCountTo);


    List<TreeEntity> getCarShiftStatus(CarWorkPlanCountTo carWorkPlanCountTo);

    void copyGrid();

    void updateRptCarWorkByTimeConsuming(String date);

    void updateRptCarWorkByTimeConsuming1();

    SsCarPlanVo ssCarPlanWork();

    QsCarPlanVo qsCarPlanWork();

    List<JxqsKaoQin> ssCarPlanWorkList(JSONObject params);

    List<JxqsKaoQin> qsCarPlanWorkList(JSONObject params);

    void updateRptCarWorkByTimeConsuming(CarWorkPlanCountTo carWorkPlanCountTo);

    void updateCleanType(String date);

    void insertGridSnapshot(CarWorkPlanCountTo carWorkPlanCountTo) throws ParseException;

    void updateTrashPickupWork(String date);

    void updateStand(String date);

    void initCarAttendance();

    PageVo garbageTransitWorkPlanByCollectStand(CarWorkPlanCountTo carWorkPlanCountTo);

    PageVo garbageTransitWorkPlanByProcessStand(CarWorkPlanCountTo carWorkPlanCountTo);

    void mileageComplete(CarWorkPlanCountTo carWorkPlanCountTo);

    void updateRptCarWorkByTimeConsuming2(CarWorkPlanCountTo carWorkPlanCountTo);

    void updateRptCarWorkByGarbageTransitWork(String date);

    BigDecimal getExpectMileage(CarWorkPlanCountTo carWorkPlanCountTo);

    PageVo garbageTransitWorkPlanDetailByCar(CarWorkPlanCountTo carWorkPlanCountTo);

    void updateTrashPickup(String workDate);

    void createRptCarWork(CarWorkPlanCountTo carWorkPlanCountTo);

    void updateCleanType(CarWorkPlanCountTo carWorkPlanCountTo);
}
